home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_2 / io.spe < prev    next >
Text File  |  1991-04-12  |  25KB  |  587 lines

  1. Article 3334 of comp.sys.handhelds:
  2. From: frechett@boulder.Colorado.EDU (-=Runaway Daemon=-)
  3. Subject: I/O on the hp48sx
  4. Summary: Copy of HP 48 I/O Technical INterfacing Guide
  5. Message-ID: <1991Jan10.081920.19016@csn.org>
  6. Date: 10 Jan 91 08:19:20 GMT
  7. Sender: news@csn.org
  8. Organization: University of Colorado, Boulder
  9.  
  10.  
  11. Well, here it is.  I am sure that a few of you would really like to know
  12. just how in the hell the I/O on the hp48sx really works.  Well, for all you 
  13. people who can't access the hpbbs and request a hardcopy of this document from
  14. the sysop, here is the HP 48 I/O Technical Interfacing Guide
  15. presented with permission in plain ASCII format.  I have found this guide 
  16. extremely interesting and valuable.  Read the part about leaving the 
  17. IO port open. ;)  Two things I should say first.  
  18. 1. There are NO other guides like this.. Or at least not right now. Don't ask.
  19. 2. Any errors found in my typing are purely in your imagination, as I don't 
  20. make mistakes.  ;)  Seriously though, if you find any errors, tell me so that I
  21. can keep this updated.  I will indoubtably put a copy on wuarchive.wustl.edu
  22. at some point to keep all the ftp nuts happy.  
  23. Have fun with it.  
  24.  
  25.     ian          -=Runaway Daemon=-
  26.  
  27. P.S.  Got my 128K CMT SRAM card today.  I love it already. 
  28.  
  29.  
  30. ------------------------------------------------------------------------------
  31.  
  32.  
  33.  
  34.             HP 48 I/O
  35.                 TECHNICAL INTERFACING GUIDE
  36.  
  37.  
  38.          copyright Hewlett_Packard Company 1990
  39.                    All Rights reserved.
  40.                       June 14, 1990
  41.  
  42.  
  43.  
  44.                          CONTENTS
  45.  
  46. 1. Introduction  . . . . . . . . . . . . . . . . . . . . . . . . 1
  47.  
  48. 2. Wired Serial I/O Hardware . . . . . . . . . . . . . . . . . . 1
  49.    2.1 Cable Wiring. . . . . . . . . . . . . . . . . . . . . . . 1
  50.    2.2 Serial Format . . . . . . . . . . . . . . . . . . . . . . 3
  51.    2.3 Serial Electrical Specifications  . . . . . . . . . . . . 3
  52.    2.4 Serial UART Operation . . . . . . . . . . . . . . . . . . 4
  53.  
  54. 3. Infrared I/O Hardware . . . . . . . . . . . . . . . . . . . . 5
  55.    3.1 IR Format . . . . . . . . . . . . . . . . . . . . . . . . 5
  56.    3.2 Transmit and Receive Circuits . . . . . . . . . . . . . . 6
  57.    3.3 IR Specifications and Receive Circuits. . . . . . . . . . 7
  58.    3.4 IR UART Operation . . . . . . . . . . . . . . . . . . . . 8
  59.  
  60. 4. Kermit File Transfer. . . . . . . . . . . . . . . . . . . . . 8
  61.  
  62. 5. Non-Kermit I/O. . . . . . . . . . . . . . . . . . . . . . . . 9
  63.    5.1 General Considerations. . . . . . . . . . . . . . . . . . 9
  64.    5.2 Special Considerations for IR . . . . . . . . . . . . . . 9 
  65.  
  66.  
  67. #Daemon's note.  Page numbers are at end of pages.
  68.  
  69.  
  70.  
  71.  
  72.  
  73.                                - i -
  74.  
  75.  
  76.  
  77. 1.  Introduction
  78.  
  79. This document gives HP 48 hardware information required to connect serial
  80. devices to the wired (serial) I/O port or to communicate with the HP 48 via the
  81. 2-way infrared (IR) I/O port.  It also gives some consideration for I/O
  82. software on devices connected to the HP 48, and should be read in conjunction
  83. with "HP 48 I/O SOFTWARE INTERFACING GUIDE" which gives suggestions for
  84. programming the HP 48.  The serial I/O port is a full-duplex UART with RS-232
  85. compatible signal level shifting.  The IR I/O port uses an infrared receiver
  86. circuit for input and and LED for output, giving a half-duplex IR UART.  For
  87. both serial and IR ports, incoming bytes are received in the interrupted system
  88. (when the port is open) up to 255 byte limit of the input buffer.  
  89.  
  90. While every effort has been made to insure the accuracy of the information
  91. contained herein, this document and any examples contained herein are provided
  92. "as is" and are subject to the change without notice.  Hewlett-Packard makes no
  93. warranty of and kind with regard to this document, including, but not limited
  94. to, the implied warranties of merchantability and fitness for a particular
  95. purpose.  Hewlett-Packard Company shall not be liable for any errors of for
  96. incidental of consequential damages in connection with the furnishing,
  97. performance, or use of this document of the examples herein.
  98.  
  99. 2. Wired Serial I/O Hardware
  100.  
  101. The serial I/O port allows full-duplex communication between systems at 1200,
  102. 2400, 4800, or 9600 baud over wires with RS-232 compatible signal levels.
  103. Available parity settings are: none, odd, even, mark, or space.  Parity
  104. checking of received bytes may be disabled while still transmitting with parity.
  105. XON/XOFF handshaking can be used on either of both transmit and receive.  The
  106. serial I/O port is divided into separate receive and transmit sections which
  107. share a baud-rate-generator and and interrupt mechanism.  Both the receiver and
  108. transmitter sections are double-buffered to maximize the throughput of the
  109. serial channel. 
  110.  
  111. 2.1 Cable Wiring
  112.  
  113. The pin definitions for the HP 82208A (IBM) and 82209A (Macintosh) serial 
  114. cables for the HP 48 are shown on the next page, including the 25 pin end of
  115. the 9-25 pin adapter.  All signals are labeled from the HP 48's point of view.
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.                                - 1 -
  124.  
  125.  
  126. HP 48 I/O Cable Pinouts
  127.                                    ______________
  128. Macintosh end of cable            |   -   -   -  |
  129.                 5 -- RX (input)---|--V   V-------| 4 -- Signal GND
  130.                                   |  -   -     - |
  131.                                   |            ^-|--3 TX (output)
  132.                                   \    -    -    /
  133.                                    ----______----
  134.  
  135.  
  136. PC end of cable with 
  137. 9-25 adapter            /------------------7 Signal GND
  138.                         |       /----------3 TX (output)
  139.                         |       | /--------2 RX (input) 
  140.            13           V       V V V------1 SHIELD
  141.            ___________________________ 
  142.           \ O O O O O O O O O O O O O /
  143.            \ O O O O O O O O O O O O /
  144.              -----------------------
  145.             25                     14
  146.  
  147.  
  148.  
  149. PC end of cable   
  150.                    /--------------5 Signal GND
  151.                    |   /----------3 RX (input)
  152.                    |   | /--------2 TX (output)
  153.                    V   V V 1
  154.                  _____________
  155.                  \ O O O O O /
  156.                   \ O O O O /
  157.                     -------
  158.                     9     6
  159.  
  160.  
  161. Notes:
  162. 1. Output = from HP 48     _________
  163. s. Input  = to HP48       | o o o o |
  164.                            \_______/
  165.                             ^ ^ ^ ^
  166.                             | | | \------ 1 SHIELD
  167.                             | | \---------2 TX (output)
  168.                             | \-----------3 RX (input)
  169.                             \-------------4 Signal GND
  170.  
  171.  
  172.  
  173.  
  174.  
  175.                            - 2 -
  176.  
  177.  
  178.  
  179. 2.2 Serial Format
  180.  
  181. A frame of serial data consists of a start bit, eight data bits, and at least
  182. one stop bit.  The start bit is equivalent to a "0" data bit and a stop bit is
  183. equivalent to a "1" data bit.  The data bits are sent least-significant-bit
  184. first.  The HP 48 transmitter sends slightly more than 2 stop bits with every
  185. frame.  The HP 48 receiver requires at least 1 stop bit for proper frame
  186. synchronization. 
  187.  
  188. A mark condition or "1" data bit on the serial line corresponds to a negative
  189. voltage.  A space condition or "0" data bit corresponds to a positive voltage.
  190. an idle corresponds to zero voltage.  The line is held in this low power (idle)
  191. state when the port is closed.  when the port is open, the line is normally
  192. held in the mark condition.  When data is to be transmitted it must start in
  193. the mark condition.  When the line is to be returned to the idle condition is
  194. must pass through the mark condition first.  
  195.  
  196. A break condition is when the line is held in the space condition for at least
  197. one entire frame. A break should not start in the middle of a character.
  198.  
  199. 2.2.1  Example: an 'H' (48hex)
  200.                      0     0     0     1     0     0     1     0 
  201.             |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |
  202. SPACE +V     _______________________       ___________       _____
  203.             |                       |     |           |     |     |
  204. SIGNAL GND -|- - - - - - - - - - - -|- - -|- - - - - -|- - -|- - -|- - - - - -
  205.             |                       |     |           |     |     |
  206. MARK  -V ---      LSB                -----             ----- MSB   -----------
  207.             |<--->|<--------------------------------------------->|<--------->|
  208.              START               DATA BITS                           STOP
  209.               BIT   
  210.  
  211. 2.3 Serial Electrical Specifications 
  212.  
  213. The following table gives the port electrical operating specifications.  The TX
  214. output voltage swing is measured at the end of a 1-meter cable with the
  215. specified load, where the 500 pF includes distributed capacitance in the cable.
  216.  
  217.  ___________________________________________________________________________
  218. | Signal |           Description                  | Min | Typ | Max | Units |
  219. |===========================================================================|
  220. |        |Out V swing. Load 3KOhm min, 500 pF max |+-3.0| 3.5 |     |       |
  221. |   TX   |----------------------------------------|-----|-----|-----|-------|
  222. |        | Bit width tolerance                    |     |     | 2.5 |  %    |
  223. |--------|----------------------------------------|-----|-----|-----|-------|
  224. |        | Input + operating range                | 1.0 |     |15.0 |  V    |
  225. |        |----------------------------------------|-----|-----|-----|-------|
  226. |        | Input - operating range                |-15.0|     |0.3  |  V    |
  227. |   RX   |----------------------------------------|-----|-----|-----|-------|
  228. |        | Input impedance                        | 5.0 |     | 7.0 | KOhms |
  229. |        |----------------------------------------|-----|-----|-----|-------|
  230. |        | Bit width tolerance                    |     |     | 2.5 |  %    |
  231. |--------|----------------------------------------|-----|-----|-----|-------|
  232. | All    | Absolute maximum voltage              |     |     |+-25 |  V    |
  233.  ---------------------------------------------------------------------------
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.                                - 3 -
  241. 2.4 Serial UART Operation
  242.  
  243. 2.4.1 Receiver Operation
  244.  
  245. Port must be open to receive data.  HP 48 Kermit I/O functions, XMIT, and SRECV
  246. all open the port automatically if it is closed.  The following description fo
  247. the HP 48 receiver is offered as a model for the receiver on and external
  248. device communicating with the 48.
  249.  
  250. All bit timing is relative to the leading-edge of the start bit.  The
  251. resolution of this timing is 16 times the baud setting.  The data on the RX
  252. pin is shifted into a shift register at the center of the bit time.  When the
  253. RX pin goes to the space condition (indicating the start of a frame) the
  254. receive clock starts.  If the RX pin remains in the space condition for at
  255. least half a bit time, the start bit is considered valid and the receive shift
  256. register is enabled.  If the RX pin returns to mark condition before a half bit
  257. time elapses, the receive clock stopped and the frame aborted.
  258.  
  259. When the shift register has shifted in a start bit, eight data bits, and a stop
  260. bit, it transfers the eight data bits to the receive buffer register (RBR),
  261. sets the receive buffer full flag (RBF), and reinitializes the shift register.
  262. If the RBF flag was already set, the receive error (RER) flag is set to
  263. indicate an overrun.  If the stop bit was not a "1" (mark condition), the RER
  264. flag is set to indicate a framing error.  Then the receiver returns to its idle
  265. state of waiting for a valid start bit.  Another incoming frame may be received
  266. while software is responding to the RBF condition.  
  267.  
  268. The HP 48 software reads the byte out of the RBR and places the bytes in a 255
  269. byte input buffer.  All parity checking is done in software when the bytes are
  270. read out of this input buffer.  
  271.  
  272. 2.4.2 Interpretation of Break Condition
  273.  
  274. a break condition on the line will be interpreted as a valid start bit followed
  275. by eight zero data-bits and at least one "0" (invalid) stop-bit.  Thus a break
  276. condition will result in a null byte in RBR and setting RER and RBF.  The start
  277. bit filter will prevent an extended break condition from being interpreted as
  278. additional characters until the line returns to the mark condition. 
  279.  
  280. 2.4.3 Transmitter Operation
  281.  
  282. When the port is closed, the transmit voltage level shifter is turned off to
  283. save power.  The TX pin is shorted to signal ground to send a line idle
  284. condition.  When the port is opened, the transmit level shifter is enabled and
  285. the TX pin goes to the mark condition.  For each data byte of data, the
  286. transmitter sends 2 stop bits, 1 start bit, and 8 data bits plus 3/16 bit
  287. internal clocking delay for a total of 11.375 bits per frame.  Therefore the
  288. maximum transmission rate is:
  289.  
  290.      Baud setting/11.375   (844 characters/second at 9600 baud)
  291.  
  292.  
  293.  
  294.                               - 4 -
  295.  
  296. 3. Infrared I/O Hardware
  297.  
  298. The IR port allows half-duplex communications between systems at 2400 baud
  299. using pulses of infrared light instead of wires.  Full-duplex is not used due
  300. to the need to suppress reflections.  
  301.  
  302. 3.1 IR Format
  303.  
  304. The format for IR transmission is similar to serial transmission except a
  305. pulse of infrared light of 52 us duration (nominal) is used to transmit a
  306. zero-bit.  the absence of a pulse indicates a one-bit or idle condition.  Note
  307. that if the pulses are stretched out to fill a bit time this becomes very
  308. similar to the serial signal.
  309.  
  310. 3.1.1 Example: an 'H' (48 hex)
  311.  
  312.  
  313.  
  314.                |           |              |               |
  315.                                            ___
  316.                                           |   |
  317.                -------------              |   '------------
  318.  
  319.                                           |<->| 52 us
  320.                |<--------->|              |<------------->|
  321.                | 416.7 us  |              |   416.7 us    | 
  322.                \_____      |              |     __________/
  323.                      \     |              |    /
  324.                       |    |              |    |
  325.           0    0    0    1    0    0    1    0
  326.   |    |    |    |    |    |    |    |    |    |    |    |  
  327.  
  328.   #    #    #    #         #    #         #
  329.   #    #    #    #         #    #         #
  330.   #    #    #    #         #    #         #
  331. -- ---- ---- ---- --------- ---- --------- -------------------
  332.   |    | LSB                                MSB|         |
  333.   |<-->|<-------------------------------->|<------------>|
  334.    START       DATA BITS                      STOP
  335.     BIT                                       BITS
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.                            - 5 -
  349.  
  350.  
  351. 3.2 Transmit and Receive Circuits
  352.  
  353. The first circuit shown below detects incoming IR pulses and produces the
  354. signal shown at the left, labeled "IN".  The second circuit generates the IR
  355. output given the signal shown at the left, labeled "OUT".
  356.  
  357. Receive Circuit.
  358.                             +5V
  359.                 _________________________________________________
  360.                |                           |                     |
  361.         10K    \                      18K  \               1M    \
  362.         1/8 W  / R6                   1/8W /  R8           1/8W  /  R7
  363.                \                           \                     \
  364. ---------------|                           |                     |
  365.                |                            \                    |
  366.                |                             \|                  |
  367.                 \                        Q4   |------------------|
  368.                  \|           R4             /|                  |
  369.              Q3   |----------/\/\/----------V    <---,           |
  370.                  /|     |   220K            |       '-----       |
  371.                 V       |   1/8 W           |                    |
  372.   +5V _  ____   |       |                   |                    |
  373.        ||       | 560K  /  R5        220K   /                    |
  374.        ||       | 1/8W  \            1/8W   \  R3                /
  375.   GND  --       |       /                   /                  |/
  376.                 |       |                   |------------------|  Q2
  377.                 |       |                   |                  |\
  378.                 |       |           .022uF ---  C1               V
  379.                 |       |                  ___                   |
  380.                 |       |                   |                    |
  381.                  ---------------------------|--------------------
  382.                                          ---|---
  383.                                           --|--
  384.                                             -
  385.  
  386.                           +5V
  387.                           ---
  388.       Transmit Circuit     |
  389.                 39Ohms     /
  390.                 1/8W       \  R1         Q1,Q2,Q3:  2N3904
  391.      +5V   __              /             Q4: EG&G VATEC VTT 9112
  392.            ||              |             CR1: NEC SE303A
  393.            ||            -----  --,           or
  394.    GND    -  -----  CR1   \ /    '-->         HP HEMP-3301 (narrower beam)
  395.                           ---
  396.                            |             R1-R8: 5%
  397.                            /
  398. OUT            R2        |/
  399. --------------\/\/\------| Q1
  400. ---->         500 Ohms   |\
  401.               1/8 W        V
  402.                          -----
  403.                           ---
  404.                            -
  405.  
  406.  
  407.  
  408.  
  409.  
  410.                              - 6 -
  411.  
  412.  
  413. 3.3 IR Specifications
  414.  
  415.  _______________________________________________________________________
  416. |     Description                       |  Min  |  Typ  |  Max  | Units | 
  417. |=======================================================================|
  418. | Wavelength                            |       |  940  |       |  nm   |
  419. |---------------------------------------|-------|-------|-------|-------|
  420. | Distance from transmitter to receiver |       |       |  2.0  |  in   |
  421. |---------------------------------------|-------|-------|-------|-------|
  422. | Half intensity beam width             | +-20  | +-30  |       |       |
  423. |---------------------------------------|-------|-------|-------|-------|
  424. | Receiver pulse width                  |  40   |  52   |   80  |  us   |
  425. |---------------------------------------|-------|-------|-------|-------|
  426. | Transmitter pulse width               |  46.8 |  52   |  57.2 |  us   |
  427. |---------------------------------------|-------|-------|-------|-------|
  428. | Baud                                  | 2340  | 2400  | 2460  | bit/s |
  429.  -----------------------------------------------------------------------
  430.  
  431. 1. Half intensity beam width is measured from the emitter's centerline to where
  432.    the radiant intensity is half the on-axis value.
  433.  
  434. 2. The IR transparent material used in the HP 48 card cover is GE ML4309-21051
  435.    IR TRANSPARENT FCR POLYCARBONATE.
  436.  
  437. Not to scale.
  438.                               ___________   ____________________
  439.                                |           |
  440.                                |           |       _____________
  441.                                |           |       |
  442.                                |           |       |
  443.                                |           |       |
  444.                        3.200 in            |       |
  445.                         81.3 mm            |       | Centerline
  446.                         - - - - - - - - - -|- - - -|- - - - - -  
  447.                                 ^   ^ .293 in 
  448.                            .532 in  v  7.4 mm
  449.                                 |   --------- (LED)|
  450.                            13.5 mm  ^ .238 in      |
  451.                                 v   v  6.0 mm      |
  452.                         --------------------- (###)| Phototransistor
  453.                                |           |       |_____________
  454. ALL DIMENSIONS ARE NOMINAL     |           |       
  455.                               -----------   ---------------------        
  456.  
  457. (neat picture of end of calc from end deleted)
  458.         serial     v-----LED (CR1)
  459.          oooo      O O
  460.                      ^---Phototransistor (Q4)
  461.  
  462. (neat picture of end of calc from side deleted)
  463. Calc is 1.085 in (27.6 mm) high.
  464. IR is 0.625 in (15.9 mm) high. 
  465. IR is slanted 10 degrees down from level.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.                               - 7 - 
  472.  
  473. 3.4 UART Operation
  474.  
  475. The UART uses the transmit and receive circuits for IR output and input as
  476. described below.
  477.  
  478. 3.4.1 Transmitter Operation
  479.  
  480. The port must be open to transmit data.  HP 48 Kermit I/O functions, XMIT, and
  481. SRECV all open the port automatically if it is closed.  The output of the UART
  482. is modulated under "IR Format" and send to the output circuit.
  483.  
  484. The serial port cannot be used while doing IR I/O.  It's TX pin will be held in
  485. the mark condition and breaks (SBRK command) will not be sent to the TX pin but
  486. will instead generate a series of IR pulses.  
  487.  
  488. 3.4.2 Receiver Operation
  489.  
  490. The port must be open to receive data.  HP 48 Kermit I/O functions, XMIT, and
  491. SRECV all open the port automatically if it is closed.  The following
  492. description of the HP 48 IR receiver is offered as a model for the receiver on
  493. and external device communicating with the 48.
  494.  
  495. IR pulses from the receive circuit's "IN" signal are used to set a latch whose
  496. output is called IRE (IR Event).  The receiver starts by waiting for a valid
  497. start bit.  and incoming pulse of IR will start the receiver clock, which
  498. shifts IRE into a shift register after half of a vit time and then clears IRE
  499. for the next bit.  Because this method stretchs the pulses, any pulse of light
  500. that is long enough to set IRE will be considered a valid start bit.  
  501.  
  502. The remaining bits are shifted in in the same fashion as described above for
  503. the wired UART including checking for framing and overrun errors and using RBR
  504. and RBF.  As in the serial port, all bit timing is relative to the leading edge
  505. of the start bit and has 1/16th bit resolution.  
  506.  
  507. Due to the probability that reflections from the transmitter will be received
  508. and interpreted by the receiver, the receiver data is ignored (by disabling
  509. receiver interrupts) while transmitting.
  510.  
  511. The serial port cannot be used while doing IR I/O.  Its RX pin will be ignored
  512. by the UART. 
  513.  
  514. 4. Kermit File Transfer
  515.  
  516. Kermit file transfer is preferable to unformated I/O since it can detect errors
  517. and correct them by re-transferring bad packets.   The Kermit you use should be
  518. set to use type 3 (CRC) checksums for IR I/O since the error rate is higher 
  519. than for wired I/O. If you use your Kermit in server mode the HP 48 will use
  520. "I" packets to request type checksums.
  521.  
  522. The HP 48 Kermit does not use XON/XOFF handshaking since Kermit packets are
  523. small enought that additional handshaking should not be necessary.  Your Kermit
  524. must have an input buffer which can hold at least 14 bytes in order to receive
  525. an "S" or "I" from the HP 48, although a larger buffer is clearly desirable for
  526. more efficient transfers.  The input buffer must also be large enough to
  527. receive the largest "F" (filename) packet that will be sent.
  528.  
  529.  
  530.  
  531.  
  532.                             - 8 -
  533.  
  534.  
  535.  
  536. 5.  Non-Kermit I/O
  537.  
  538. 5.1  General Considerations
  539.  
  540. The HP 48 can receive a maximum of 255 bytes in a continuous stream, so to
  541. transfer more than this you should use XON/XOFF handshaking or some higher
  542. level protocol which breaks the data stream into pieces smaller than this.
  543. Data sent to the HP 48 should have inter-frame gaps less than 4 frame times or
  544. greater than 4 frame times plus 5 ms.  Inter-frame gaps of between 4 frame
  545. times and 4 frame times plus 5 ms should be avoided since they may cause UART
  546. overruns on the HP 48.  Be sure the clock is not ticking in the HP 48 display
  547. since clock ticks, alarms coming due, or other timer interrupts extend the 5 ms
  548. to a much longer time, so they can cause UART overruns.  For the same reason,
  549. no keys should be pressed while doing I/O (unless the intent of the key press
  550. is to abort the I/O).  You must allow enough time for the HP 48 to read data
  551. out of its receive buffer (using SRECV) before sending more data or the 255
  552. byte receive buffer will be overflowed.  
  553.  
  554. Use of some sort of checksum is recommended, especially for IR I/O  which is
  555. sensitive to noise.  Garbage characters (most commonly FF  bytes) can be
  556. received between transmissions since a single IR or electrical noise pulse acts
  557. as a start bit.
  558.  
  559. 5.2 Special Considerations for IR
  560.  
  561. Since IR from the transmitter can reflect back into the receiver, the receiver
  562. should be ignored while transmitting and carefully cleaned up after the
  563. transmitting is done.  If your IR receive circuit is feeding a UART, you should
  564. wait for at least a half bit time after the stop bit from the last transmitted
  565. to be sure that reflected byte has been received before clearing the UART's
  566. receive buffer as well as any framing or overrun errors.  At this point the
  567. receive circuit will be ready to receive valid data, although (as noted above)
  568. this "valid data" can contain garbage characters due to IR or electrical noise
  569. pulses.  Be sure to use some reliable error detection technique if data
  570. integrity is important!
  571.  
  572. Because IR I/O half duplex (due to reflections), XON/XOFF handshaking is not
  573. possible.
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.                                - 9 -
  585.  
  586.  
  587.